You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

check-types-mini

Package Overview
Dependencies
Maintainers
1
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-types-mini

Check the types of your options object's values after user has customised them

5.9.1
Source
npmnpm
Version published
Weekly downloads
1K
-44.09%
Maintainers
1
Weekly downloads
 
Created
Source

check-types-mini

Check the types of your options object's values after user has customised them

page on npm page on codsen.com page on sourcehut Downloads per month Code style: prettier MIT License libera manifesto

Install

npm i check-types-mini

Quick Take

import { strict as assert } from "assert";
import checkTypesMini from "check-types-mini";

assert.throws(() => {
  checkTypesMini(
    checkTypesMini(
      {
        // object to check
        option1: "setting1",
        option2: "false",
        option3: false,
      },
      {
        // reference defaults object
        option1: "setting1",
        option2: false,
        option3: false,
      }
    ),
    /not boolean but string/g
  );
});

Documentation

Please visit codsen.com for a full description of the API and examples.

Licence

MIT License

Copyright (c) 2010-2020 Roy Revelt and other contributors

ok codsen star

Keywords

compare

FAQs

Package last updated on 03 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts